package cn.zhangxh.org.domain;

import cn.zhangxh.base.domain.BaseDomain;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.util.ArrayList;
import java.util.List;

/**
 * @param :
 * @Author zxh
 * @Date: 2022/1/18$ 11:15$
 * @Version 1.0
 * @return :
 * @Description: 操作数据库的接口文件
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString
public class Department extends BaseDomain {
    private String sn;
    private String name;
    @ApiModelProperty("上级部门的路径,每个部门用/隔开")
    private String dirPath;
    private Integer state;
    //上级部门
    @ApiModelProperty("上级部门id")
    private Long parent_id;
    /*封装到一个Department*/
    private Department parent;

    //部门管理员ID  Employee表
    private Long manager_id;
    /*封装到一个Department*/
    //部门管理员ID  Employee表
    private Employee manager;

    //二级部门
    private List<Department> children = new ArrayList<>();
}
